import request from '@/utils/request'

// * 查询专项申报列表
export function pageDeclare({ title, startTime, endTime, status, currPage = 1, pageSize = 10 } = {}) {
    return request({
        url: '/bt/declare/pageDeclare',
        method: 'post',
        data: { title, startTime, endTime, status, currPage, pageSize },
    })
}

// * 保存专项申报
export function addSaveDeclare(data) {
    return request({
        url: '/bt/declare/addSaveDeclare',
        method: 'post',
        data: data
    })
}

// * 发布专项申报
export function addSubmitDeclare(data) {
    return request({
        url: '/bt/declare/addSubmitDeclare',
        method: 'post',
        data: data
    })
}

// * 更新专项申报
export function updateDeclare(data) {
    return request({
        url: '/bt/declare/updateDeclare',
        method: 'post',
        data: data
    })
}

// * 查看专项申报详情
export function fetchDeclare(id) {
    return request({
        url: '/bt/declare/fetchDeclare/' + id,
        method: 'get',
    })
}

// * 删除专项申报
export function deleteDeclare(data) {
    return request({
        url: '/bt/declare/deleteDeclare/',
        method: 'get',
        params: data
    })
}

// * 查询下拉信息
export function selectOptionData(data) {
    return request({
        url: '/bt/declare/selectOptions',
        method: 'post',
        data: data
    })
}

// * 上传请求
export function upload(data) {
    return request({
        url: '/bt/declare/upload',
        method: 'post',
        data: data
    })
}